Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

esUtil.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include "esUtil.h"
#include "esUtil_win.h"

Functions

EGLBoolean CreateEGLContext (NativeWindowType hWnd, EGLDisplay *eglDisplay, EGLContext *eglContext, EGLSurface *eglSurface, EGLint attribList[])
void ESUTIL_API esInitContext (ESContext *esContext)
 Initialize ES framework context. This must be called before calling any other functions.

GLboolean ESUTIL_API esCreateWindow (ESContext *esContext, const char *title, GLint width, GLint height, GLuint flags)
 Create a window with the specified parameters.

void ESUTIL_API esMainLoop (ESContext *esContext)
 Start the main loop for the OpenGL ES application.

void ESUTIL_API esRegisterDrawFunc (ESContext *esContext, void(ESCALLBACK *drawFunc)(ESContext *))
 Register a draw callback function to be used to render each frame.

void ESUTIL_API esRegisterUpdateFunc (ESContext *esContext, void(ESCALLBACK *updateFunc)(ESContext *, float))
 Register an update callback function to be used to update on each time step.

void ESUTIL_API esRegisterKeyFunc (ESContext *esContext, void(ESCALLBACK *keyFunc)(ESContext *, unsigned char, int, int))
void ESUTIL_API esLogMessage (const char *formatStr,...)
 Log a message to the debug output for the platform.

char *ESUTIL_API esLoadTGA (char *fileName, int *width, int *height)
 Loads a 24-bit TGA image from a file.


Function Documentation

EGLBoolean CreateEGLContext NativeWindowType  hWnd,
EGLDisplay eglDisplay,
EGLContext eglContext,
EGLSurface eglSurface,
EGLint  attribList[]
 

GLboolean ESUTIL_API esCreateWindow ESContext esContext,
const char *  title,
GLint  width,
GLint  height,
GLuint  flags
 

Create a window with the specified parameters.

Parameters:
esContext Application context
title Name for title bar of window
width Width in pixels of window to create
height Height in pixels of window to create
flags Bitfield for the window creation flags ES_WINDOW_RGB - specifies that the color buffer should have R,G,B channels ES_WINDOW_ALPHA - specifies that the color buffer should have alpha ES_WINDOW_DEPTH - specifies that a depth buffer should be created ES_WINDOW_STENCIL - specifies that a stencil buffer should be created ES_WINDOW_MULTISAMPLE - specifies that a multi-sample buffer should be created
Returns:
GL_TRUE if window creation is succesful, GL_FALSE otherwise

void ESUTIL_API esInitContext ESContext esContext  ) 
 

Initialize ES framework context. This must be called before calling any other functions.

Parameters:
esContext Application context

char* ESUTIL_API esLoadTGA char *  fileName,
int *  width,
int *  height
 

Loads a 24-bit TGA image from a file.

Parameters:
fileName Name of the file on disk
width Width of loaded image in pixels
height Height of loaded image in pixels
Returns:
Pointer to loaded image. NULL on failure.

void ESUTIL_API esLogMessage const char *  formatStr,
... 
 

Log a message to the debug output for the platform.

Parameters:
formatStr Format string for error log.

void ESUTIL_API esMainLoop ESContext esContext  ) 
 

Start the main loop for the OpenGL ES application.

Parameters:
esContext Application context

void ESUTIL_API esRegisterDrawFunc ESContext esContext,
void(ESCALLBACK *drawFunc  )(ESContext *)
 

Register a draw callback function to be used to render each frame.

Parameters:
esContext Application context
drawFunc Draw callback function that will be used to render the scene

void ESUTIL_API esRegisterKeyFunc ESContext esContext,
void(ESCALLBACK *keyFunc  )(ESContext *, unsigned char, int, int)
 

void ESUTIL_API esRegisterUpdateFunc ESContext esContext,
void(ESCALLBACK *updateFunc  )(ESContext *, float)
 

Register an update callback function to be used to update on each time step.

Parameters:
esContext Application context
updateFunc Update callback function that will be used to render the scene


Generated on Thu Jan 31 11:29:22 2008 for ES Framework by doxygen 1.3.6